/**
 * Copyright &copy; 2012-2017 <a href="https://vivo.com">vivo</a> All rights reserved.
 */
package com.vivo.wares.entity;

import javax.validation.constraints.NotNull;

import com.thinkgem.jeesite.modules.sys.entity.Office;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.thinkgem.jeesite.modules.sys.entity.Area;
import com.thinkgem.jeesite.common.utils.excel.annotation.ExcelField;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 商品价格调整Entity
 * @author jyangye
 * @version 2018-01-15
 */
public class VivoWaresPriceJs extends DataEntity<VivoWaresPriceJs> {
	
	private static final long serialVersionUID = 1L;
	private Integer waresId;		// 商品ID
	private String waresName;		// 商品名称
	private String waresCode;		// 商品编码
	private String waresColorId;		// 商品颜色
	private Double costPrice;		// 成本价
	private Double firstPrice;		// 一级价
	private Double secondPrice;		// 二级价
	private Double tradePrice;		// 批发价
	private Double retailPrice;		// 零售价
	private Date makeTime;		// 生效时间
	private String opeator;		// 调价人

    private String errMsg;

    private Office comp;

    private String zone;
	
	public VivoWaresPriceJs() {
		super();
	}

	public VivoWaresPriceJs(String id){
		super(id);
	}

	@NotNull(message="商品ID不能为空")
	@ExcelField(title="*商品编号", align=2, sort=20)
	public Integer getWaresId() {
		return waresId;
	}

	public void setWaresId(Integer waresId) {
		this.waresId = waresId;
	}
	
	@Length(min=1, max=32, message="商品名称长度必须介于 1 和 32 之间")
	@ExcelField(title="商品名称", align=2, sort=30)
	public String getWaresName() {
		return waresName;
	}

	public void setWaresName(String waresName) {
		this.waresName = waresName;
	}
	
	@Length(min=1, max=32, message="商品编码长度必须介于 1 和 32 之间")
	@ExcelField(title="商品编码", align=2, sort=40)
	public String getWaresCode() {
		return waresCode;
	}

	public void setWaresCode(String waresCode) {
		this.waresCode = waresCode;
	}
	
	@Length(min=1, max=32, message="商品颜色长度必须介于 1 和 32 之间")
	@ExcelField(title="商品颜色", align=2, sort=50)
	public String getWaresColorId() {
		return waresColorId;
	}

	public void setWaresColorId(String waresColorId) {
		this.waresColorId = waresColorId;
	}
	
	@ExcelField(title="成本价", align=2, sort=60)
	public Double getCostPrice() {
		return costPrice;
	}

	public void setCostPrice(Double costPrice) {
		this.costPrice = costPrice;
	}
	
	@ExcelField(title="一级价", align=2, sort=70)
	public Double getFirstPrice() {
		return firstPrice;
	}

	public void setFirstPrice(Double firstPrice) {
		this.firstPrice = firstPrice;
	}
	
	@ExcelField(title="二级价", align=2, sort=80)
	public Double getSecondPrice() {
		return secondPrice;
	}

	public void setSecondPrice(Double secondPrice) {
		this.secondPrice = secondPrice;
	}
	
	@ExcelField(title="批发价", align=2, sort=90)
	public Double getTradePrice() {
		return tradePrice;
	}

	public void setTradePrice(Double tradePrice) {
		this.tradePrice = tradePrice;
	}
	
	@ExcelField(title="零售价", align=2, sort=100)
	public Double getRetailPrice() {
		return retailPrice;
	}

	public void setRetailPrice(Double retailPrice) {
		this.retailPrice = retailPrice;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd")
	@ExcelField(title="*生效时间", align=2, sort=110)
	public Date getMakeTime() {
		return makeTime;
	}

	public void setMakeTime(Date makeTime) {
		this.makeTime = makeTime;
	}



    @ExcelField(title="*调价二级区域", align=2, sort=120)
    public Office getComp() {
        return comp;
    }

    public void setComp(Office comp) {
        this.comp = comp;
    }

	
	@Length(min=0, max=32, message="调价人长度必须介于 0 和 32 之间")
	@ExcelField(title="调价人", align=2, sort=130)
	public String getOpeator() {
		return opeator;
	}

	public void setOpeator(String opeator) {
		this.opeator = opeator;
	}

    @Length(min=0, max=32, message="所在区域必须介于 0 和 32 之间")
    @ExcelField(title="*所在区域（安徽区域/江苏区域）", align=2, sort=140, dictType = "emp_zone")
    public String getZone() {
        return zone;
    }

    public void setZone(String zone) {
        this.zone = zone;
    }

    @ExcelField(title="错误信息（导出查错）", align=2, sort=150)
    public String getErrMsg() {
        return errMsg;
    }

    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }
}